home *** CD-ROM | disk | FTP | other *** search
- /* This example use of imageio.library displays all the formats the are
- writeable.
- */
-
- #include <stdio.h>
-
- #include <dos/dos.h>
- #include <exec/memory.h>
- #include <exec/types.h>
-
- #include <clib/dos_protos.h>
- #include <clib/exec_protos.h>
- #include <clib/intuition_protos.h>
-
- #include <pragmas/dos_pragmas.h>
- #include <pragmas/exec_pragmas.h>
- #include <pragmas/intuition_pragmas.h>
-
- #include <imageio/imageio.h>
- #include <imageio/imageio_protos.h>
- #include <imageio/imageio_pragmas.h>
-
- /* Function prototypes */
-
- extern struct Library *DOSBase;
- struct Library *ImageIOBase, *IntuitionBase;
-
- void main( int argc, char **argv )
- {
- ImageIOBase = OpenLibrary( "imageio.library", 3 );
- if ( ImageIOBase )
- {
- void *handle = NULL;
- ULONG format;
-
- printf( "Writeable image formats:\n");
-
- while ( ( format = format = GetAvailWriteFormat( &handle ) ) != IMGF_UNKNOWN )
- {
- printf( "\tformat %ld\n", format );
- };
-
- CloseLibrary( ImageIOBase );
- }
- }
-